import request from '@/utils/request'


export const test = ()=>{
  return request({
    url:`/test`,
    method:'post'
  })
}

export const queryProjectList = ()=>{
  return request({
    url:`/deliver/project/list`,
    method:'post'
  })
}
export const saveProject = (data: any)=>{
  return request({
    url:`/deliver/project/save`,
    data,
    method:'post'
  })
}
export const saveReleasePlan= (data: any)=>{
  return request({
    url:`/deliver/project/savePublishPlan`,
    data,
    method:'post'
  })
}
export const saveApp = (data: any)=>{
  return request({
    url:`/deliver/project/saveApp`,
    data,
    method:'post'
  })
}
export const saveCodeupApp = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/save`,
    data,
    method:'post'
  })
}
export const queryCodeupApp = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/query`,
    data,
    method:'post'
  })
}
export const addCodeupAppLink = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/link`,
    data,
    method:'post'
  })
}
export const queryCodeupAppLink = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/queryAppLink`,
    data,
    method:'post'
  })
}

export const saveCodeupReleasePlan = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/saveReleasePlan`,
    data,
    method:'post'
  })
}
export const queryCodeupReleasePlan = (data: any)=>{
  return request({
    url:`/deliver/codeup/app/queryReleasePlan`,
    data,
    method:'post'
  })
}
export const queryReleasePlanList = ()=>{
  return request({
    url:`/deliver/project/queryReleasePlanList`,
    method:'post'
  })
}
export const queryApps = ()=>{
  return request({
    url:`/deliver/project/queryApps`,
    method:'post'
  })
}
export const queryReleasePlanDetail = (data)=>{
  return request({
    url:`/deliver/project/queryReleasePlanDetail`,
    data,
    method:'post'
  })
}
export const addCodeupAppDeployTask = (data: { linkId: number; projectId: any; planId: any })=>{
  return request({
    url:`/deliver/codeup/app/addDeployTask`,
    data,
    method:'post'
  })
}

export const saveCertificate = (data: any)=>{
  return request({
    url:`/certificate/save`,
    method:'post',
    data
  })
}
export const releasePlanLinkApp = (data: any)=>{
  return request({
    url:`/deliver/project/releasePlanLinkApp`,
    method:'post',
    data
  })
}
export const queryProjectPipeline = (data: any):any=>{
  return request({
    url:`/deliver/project/queryProjectPipeline`,
    method:'post',
    data
  })
}
export const queryDeployRecord = (data: any)=>{
  return request({
    url:`/deliver/project/queryDeployRecord`,
    method:'post',
    data
  })
}
export const  saveGateway = (data: any)=>{
  return request({
    url:`/deliver/gateway/save`,
    method:'post',
    data
  })
}

export const queryGateway = (data: any)=>{
  return request({
    url:`/deliver/gateway/query`,
    method:'post',
    data
  })
}
export const saveGatewayResource = (data: any)=>{
  return request({
    url:`/deliver/gateway/saveResource`,
    method:'post',
    data
  })
}
export const queryGatewayResource = (data: any)=>{
  return request({
    url:`/deliver/gateway/queryResource`,
    method:'post',
    data
  })
}
export const queryResource = (data: any)=>{
  return request({
    url:`/deliver/resource/query`,
    method:'post',
    data
  })
}
export const saveResource = (data: any)=>{
  return request({
    url:`/deliver/resource/queryResource`,
    method:'post',
    data
  })
}
export const destroyResource = (data: any)=>{
  return request({
    url:`/deliver/resource/destroy`,
    method:'post',
    data
  })
}
export const queryI18nApp = (data: any)=>{
  return request({
    url:`deliver/i18n/queryApp`,
    method:'post',
    data
  })
}
export const saveI18nApp = (data: any)=>{
  return request({
    url:`deliver/i18n/saveApp`,
    method:'post',
    data
  })
}
export const queryI18nAppLink = (data: any)=>{
  return request({
    url:`deliver/i18n/queryAppLink`,
    method:'post',
    data
  })
}
export const saveI18nAppLink = (data: any)=>{
  return request({
    url:`deliver/i18n/saveAppLink`,
    method:'post',
    data
  })
}
export const syncAppLink = (data: any)=>{
  return request({
    url:`deliver/i18n/syncAppLink`,
    method:'post',
    data
  })
}
